-- CALC_MR_WOLF_BONUS

-- 计算狼先生掉落
-- @param user     玩家对象
return function(user)
    local rand = DungeonM.getRandSeed("mr_wolf");
    local bonus = {};

    local arr = {
        {["class_id"] = 8182, ["ratio"] = 40},
        {["class_id"] = 8183, ["ratio"] = 40},
        {["class_id"] = 8184, ["ratio"] = 40},
        {["class_id"] = 7315, ["ratio"] = 10},
        {["class_id"] = 7374, ["ratio"] = 40},
        {["class_id"] = 7375, ["ratio"] = 40},
        {["class_id"] = 7376, ["ratio"] = 40},
        {["class_id"] = 7377, ["ratio"] = 40},
    };

    local map;
    for _, map in pairs(arr) do
        local classId = map["class_id"];

        if table.indexOf({ 8182, 8183, 8184, }, classId) ~= -1 and
            1 <= DungeonServiceM.getItemStat(classId) then
            map["ratio"] = 0;
        end
    end

    local elem = fetchElemBySeed(arr, rand);
    bonus = { 1, elem["class_id"], 1 };

    return bonus;
end